package com.sync.test;

import java.util.Random;

import com.koloboke.collect.map.hash.HashIntIntMap;
import com.koloboke.collect.map.hash.HashIntIntMaps;

public class MapVsVec {
	public static void main(String[] args) {
		int[] data = new int[16];
		HashIntIntMap dataMap = HashIntIntMaps.newMutableMap();
		Random random = new Random();
		int j = 0;
		long start = System.currentTimeMillis();
		for (int i = 0; i < 1000000; i++) {
			dataMap.addValue(i, i);
		}
		System.err.println(System.currentTimeMillis() - start);
		HashIntIntMap dataMap2 = HashIntIntMaps.newMutableMap();
		start = System.currentTimeMillis();
		for (int i = 0; i < 500000; i++) {
			dataMap.addValue(i, i);
		}
		for (int i = 500000; i < 1000000; i++) {
			dataMap2.addValue(i, i);
		}
		System.err.println(System.currentTimeMillis() - start);
	}
}
